//
//  DENFindListTableViewCell.m
//  Icar
//
//  Created by apple on 15/10/19.
//  Copyright © 2015年 小龙侠. All rights reserved.
//

#import "DENFindListTableViewCell.h"

@implementation DENFindListTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self creatControl];
    }
    return self;
}
- (void)creatControl
{
//    创建logo视图
    self.logoImageView = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH(15), HEIGHT(5), WIDTH(55), HEIGHT(50))];
    [self.contentView addSubview:self.logoImageView];
//    创建名称
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(WIDTH(85), HEIGHT(23), WIDTH(200), HEIGHT(15))];
    [self.contentView addSubview:self.nameLabel];
}
#pragma mark- 重写modelSet方法
- (void)setFindModel:(DENFindModel *)findModel
{
//    请求图片
    NSURL *url = [NSURL URLWithString:findModel.logo];
    [self.logoImageView sd_setImageWithURL:url placeholderImage:nil];
//    商标名字
    self.nameLabel.text = findModel.name;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
